import axios from 'axios'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'


let todolist=axios.create({
  baseURL:'http://localhost:3002',
  timeout:3000,
})

todolist.interceptors.request.use((config)=>{
  NProgress.start()
  return config
})

todolist.interceptors.response.use((req)=>{
  NProgress.done()
  return req.data
})

export default todolist